<?php

namespace App\Http\Requests\YouZan;

use App\Http\Requests\ApiRequest;

/**
 * @property string customer_id
 * @property string store_id
 */
class OAuthRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'customer_id' => 'required_without:store_id|int|min:1',
            'store_id'    => 'required_without:customer_id|int|min:1',
        ];
    }
}
